public class Car extends Vehicle{
    private String model;
    private static final String specialOffers="租车超过7天九折优惠，超过30天八折优惠，超过150天五折优惠。";


    public Car(String brand, String plate_number, double dayRent, String model) {
        super(brand, plate_number, dayRent);
        this.model = model;
    }

    public Car(String model) {
        this.model = model;
    }

    @Override
    public double rentCalculation(int days) {
        if (days>150){
            return getDayRent()*days*0.50;
        }else if (days>30){
            return getDayRent()*days*0.80;
        }else if (days>7){
            return getDayRent()*days*0.90;
        }else {
            return getDayRent()*days;
        }
    }

    @Override
    public String toString() {
        return getBrand()+"品牌的"+model+"车牌是"+getPlate_number()+"租金是"+getDayRent()+"元每天，优惠信息："+Car.specialOffers;
    }
}
